﻿using StructureMap.Configuration.DSL;
using StructureMap.Interceptors;
using StructureMap;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Base;

namespace PrimerOne
{
    public class Registrar
    {
        public static void Register()
        {
            ObjectFactory.Initialize(x =>
            {
                x.AddRegistry<BaseRegistry>();
                x.AddRegistry<PrimerOneRegistry>();
            });

            Base.Registrar.Register();
        }
    }

    public class PrimerOneRegistry : Registry
    {
        public PrimerOneRegistry()
        {
            For<GameHandler>().OnCreationForAll(x => x.Start());            
        }
    }
}